import request from '@/router/axios';
let url = '/http/admin/user' //云函数后面的url
let registerUrl = '/http/admin/center' //注册
// let url = '/http/test'  //test
// 查询
export const list = params => request({
    url,
    method: 'get',
    params: {
        action: 'list',
        params
    }
})
// 添加
export const add = params => request({
    url: registerUrl,
    method: 'post',
    data: {
        action: 'register',
        params: {
            ...params,
            platform: 1,
            status: 0
        }
    }
})
// 删除
export const del = params => request({
    url,
    method: 'post',
    data: {
        action: 'del',
        params
    }
})
// 修改
export const update = params => request({
    url,
    method: 'post',
    data: {
        action: 'update',
        params
    }
})
// 禁用
export const disable = params => request({
    url,
    method: 'post',
    data: {
        action: 'disable',
        params
    }
})